package com.woniuxy.yoga.user.model.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel("用户注册参数对象")
public class UserRegisterForm {

    @ApiModelProperty("用户名")
    @NotNull
    private String userName;

    @ApiModelProperty("手机号")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "手机号格式不正确")
    private String userPhone;

    @ApiModelProperty("验证码")
    @NotNull
    private String code;

    @ApiModelProperty("用户密码")
    @NotNull
    private String userPass;
}
